home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Application / ApplicationBase.h < prev    next >
Text File  |  2000-06-23  |  1KB  |  59 lines

  1. // ApplicationBase.h
  2.  
  3. #ifndef ApplicationBase_h
  4. #define ApplicationBase_h
  5.  
  6. #ifndef ApplicationZoneUser_h
  7. #include "ApplicationZoneUser.h"
  8. #endif
  9. #ifndef EventHandler_h
  10. #include "EventHandler.h"
  11. #endif
  12. #ifndef PreparingToQuit_h
  13. #include "PreparingToQuit.h"
  14. #endif
  15. #ifndef Broadcaster_h
  16. #include "Broadcaster.h"
  17. #endif
  18. #ifndef Opening_h
  19. #include "Opening.h"
  20. #endif
  21. #ifndef Creating_h
  22. #include "Creating.h"
  23. #endif
  24. #ifndef CoreEventHandler_h
  25. #include "CoreEventHandler.h"
  26. #endif
  27.  
  28. class ApplicationBase: public ApplicationZoneUser,
  29.                               public EventHandler,
  30.                               public Opening,
  31.                               public Creating,
  32.                               public CoreEventHandler
  33.   {
  34.     private:
  35.         static ApplicationBase *the;
  36.         
  37.         // not implemented:
  38.             ApplicationBase( const ApplicationBase& );
  39.             void operator=( const ApplicationBase& );
  40.         
  41.     protected:
  42.         ApplicationBase( uint32 masterPointers = 128,
  43.                               uint32 extraStackSpace = 0 );
  44.         
  45.         ~ApplicationBase();
  46.         
  47.     public:
  48.         static ApplicationBase& The()     { Assert( the != 0 ); return *the; }
  49.         
  50.         virtual void Run();
  51.  
  52.         virtual void OpenApplication( const AEEvent& event, AEEvent& reply );
  53.         virtual void OpenDocuments(   const AEEvent& event, AEEvent& reply );
  54.         virtual void PrintDocuments(  const AEEvent& event, AEEvent& reply );
  55.         virtual void QuitApplication( const AEEvent& event, AEEvent& reply );
  56.   };
  57.  
  58. #endif
  59.